package com.ruoyi.bysj.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bysj.mapper.SysAppointmentMapper;
import com.ruoyi.bysj.domain.SysAppointment;
import com.ruoyi.bysj.service.ISysAppointmentService;

/**
 * 车主预约Service业务层处理
 * 
 * @author laowang
 * @date 2021-10-15
 */
@Service
public class SysAppointmentServiceImpl implements ISysAppointmentService 
{
    @Autowired
    private SysAppointmentMapper sysAppointmentMapper;

    /**
     * 查询车主预约
     * 
     * @param appointmentId 车主预约主键
     * @return 车主预约
     */
    @Override
    public SysAppointment selectSysAppointmentByAppointmentId(Long appointmentId)
    {
        return sysAppointmentMapper.selectSysAppointmentByAppointmentId(appointmentId);
    }

    /**
     * 查询车主预约列表
     * 
     * @param sysAppointment 车主预约
     * @return 车主预约
     */
    @Override
    public List<SysAppointment> selectSysAppointmentList(SysAppointment sysAppointment)
    {
        return sysAppointmentMapper.selectSysAppointmentList(sysAppointment);
    }

    @Override
    public List<SysAppointment> selectSysAppointmentByUserName(String userName) {
        return sysAppointmentMapper.selectSysAppointmentByUserName(userName);
    }

    @Override
    public List<SysAppointment> selectSysAppointmentByDate() {
        return sysAppointmentMapper.selectSysAppointmentByDate();
    }

    /**
     * 新增车主预约
     * 
     * @param sysAppointment 车主预约
     * @return 结果
     */
    @Override
    public int insertSysAppointment(SysAppointment sysAppointment)
    {
        return sysAppointmentMapper.insertSysAppointment(sysAppointment);
    }

    /**
     * 修改车主预约
     * 
     * @param sysAppointment 车主预约
     * @return 结果
     */
    @Override
    public int updateSysAppointment(SysAppointment sysAppointment)
    {
        return sysAppointmentMapper.updateSysAppointment(sysAppointment);
    }

    /**
     * 批量删除车主预约
     * 
     * @param appointmentIds 需要删除的车主预约主键
     * @return 结果
     */
    @Override
    public int deleteSysAppointmentByAppointmentIds(Long[] appointmentIds)
    {
        return sysAppointmentMapper.deleteSysAppointmentByAppointmentIds(appointmentIds);
    }

    /**
     * 删除车主预约信息
     * 
     * @param appointmentId 车主预约主键
     * @return 结果
     */
    @Override
    public int deleteSysAppointmentByAppointmentId(Long appointmentId)
    {
        return sysAppointmentMapper.deleteSysAppointmentByAppointmentId(appointmentId);
    }
}
